/*
** my.h for  in /home/georgi_v/rendu/PSU_2013_minishell1/include
** 
** Made by georgi_v
** Login   <georgi_v@epitech.net>
** 
** Started on  Thu Nov  7 14:58:20 2013 georgi_v
** Last update Sat Dec  7 19:49:05 2013 georgi_v
*/

#ifndef MY_H_
# define MY_H_
# include <stdlib.h>
# include <stdarg.h>
# include <stdio.h>
# include <sys/types.h>
# include <signal.h>
# include <limits.h>

typedef struct s_list_ex
{
  char			*str;
  int			color;
  struct s_list_ex	*next;
}			t_list_ex;

typedef struct s_str_f
{
  char		fstr;
  int		(*conv)(va_list);
}		data_t;

typedef	struct	s_list
{
  data_t	*data;
  struct s_list	*next;
}		t_list;

int	add_elem_front(t_list **list, data_t *data);
int	add_elem_end(t_list **list, data_t *data);
int	get_list_size(t_list *list);
data_t	*get_node_by_char(t_list *list, char c);
data_t	*add_data(char c, int (*conv)(va_list));
void	free_data(data_t  *data);
int	my_getnbr(char *str);
int	my_isneg(int n);
int	my_power(int nb, int power);
void	my_putchar(char c);
void	my_putnbr(int nb);
void	my_putstr(char *str);
char	*my_revstr(char *str);
void	my_sort_int(int *tab, int size);
int	my_square_root(int nb);
int	my_starts_with(char *str, char *start_str);
int	my_strcmp(char *s1, char *s2);
char    *my_str_concat(char *str1, char *str2);
char	*my_strcpy(char *dest, char *src);
int	my_str_isalpha(char *str);
int	my_str_islower(char *str);
int	my_str_isnum(char *str);
int	my_str_isprintable(char *str);
int	my_str_isupper(char *str);
int	my_strlen(char *str);
char	*my_strlowcase(char *str);
char    *my_str_slash_concat(char *str1, char *str2);
char	**my_str_to_wordtab(char *str, char separator);
int     convert_to_base_long(unsigned long int num, char *str_base);
int     convert_to_addr(va_list list);
int     convert_to_base(unsigned int num, char *str_base);
int     convert_to_base_sign(int num, char *str_base);
int     convert_to_bin(va_list list);
int     convert_to_oct(va_list list);
int     convert_to_dec(va_list list);
int     convert_to_hex_capital(va_list list);
int     convert_to_hex_small(va_list list);
int     convert_to_char(va_list list);
int     convert_to_str(va_list list);
void    process_amps(const char *str, int *bcnt);
int     process_char(const char *str, va_list ap, int *cnt);
int     convert_to_non_prt(va_list list);
int     convert_to_base_long(unsigned long num, char *str_base);
int	convert_to_unsig_int(va_list list);
int	convert_to_base(unsigned int num, char *str_base);
int	convert_to_base_sign(int num, char *str_base);
t_list	*init();
char	**parse_line(char *, char);
char	*get_next_line(const int);

#endif /* !MY_H_ */
